﻿namespace Skymate.Reids.Sentinel
{
    using System;

    using Abp.Modules;
    using Abp.Runtime.Caching.Redis;

    /// <summary>
    /// reids 集群测试 module
    /// </summary>
    [DependsOn(typeof(AbpRedisCacheModule))]
    public class ReidsSentinelCacheModule : AbpModule
    {
        public override void PreInitialize()
        {
            this.Configuration.Caching.ConfigureAll(cache =>
                {
                    //cache.DefaultSlidingExpireTime = TimeSpan.FromMinutes(1);// 多久未访问
                    // 设置1min缓存失效
                    cache.DefaultAbsoluteExpireTime = TimeSpan.FromMinutes(1);// 定时销毁
                });
            this.Configuration.Caching.UseRedis();

        }
    }
}